package com.dctp.common.db;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

public class RoleDb {
    public static Record findById(Long id) {
        return Db.findFirst("SELECT id, name, code,level FROM dctp_role WHERE id = ?", id);
    }
    public static Record findByCode(String code) {
        return Db.findFirst("SELECT id, name, code,level FROM dctp_role WHERE code = ?", code);
    }
}
